<object  id="LODOP" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>  
       <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed> 
</object> 
<script>
 var LODOP=getLodop(document.getElementById('LODOP'),document.getElementById('LODOP_EM'));
 function CreatePrintPage() {
    LODOP.PRINT_INIT("套打EMS的模板");
	LODOP.PRINT_INITA(22,7,799,440,"套打EMS的模板");
	LODOP.ADD_PRINT_SETUP_BKIMG("D:\\report\\report.jpg");
	LODOP.SET_SHOW_MODE("BKIMG_WIDTH",794);
	LODOP.SET_SHOW_MODE("BKIMG_HEIGHT",440);
<?php if($this->isMy=="1"): ?>
	LODOP.ADD_PRINT_TEXT(99,143,100,20,"");
	LODOP.ADD_PRINT_TEXT(103,602,41,20,"<?=$this->year?>");
	LODOP.ADD_PRINT_TEXT(103,662,29,20,"<?=$this->moth?>");
	LODOP.ADD_PRINT_TEXT(104,702,29,20,"<?=$this->today?>");
	LODOP.ADD_PRINT_TEXT(183,91,28,21,"<?=$this->items['moth'][0]?>");
	LODOP.ADD_PRINT_TEXT(213,93,25,24,"<?=$this->items['moth'][1]?>");
	LODOP.ADD_PRINT_TEXT(242,91,28,25,"<?=$this->items['moth'][2]?>");
	LODOP.ADD_PRINT_TEXT(277,90,29,20,"<?=$this->items['moth'][3]?>");
	LODOP.ADD_PRINT_TEXT(304,91,32,20,"<?=$this->items['moth'][4]?>");
	
	LODOP.ADD_PRINT_TEXT(184,123,28,20,"<?=$this->items['day'][0]?>");
	LODOP.ADD_PRINT_TEXT(219,119,33,20,"<?=$this->items['day'][1]?>");
	LODOP.ADD_PRINT_TEXT(246,123,27,20,"<?=$this->items['day'][2]?>");
	LODOP.ADD_PRINT_TEXT(277,119,31,20,"<?=$this->items['day'][3]?>");
	LODOP.ADD_PRINT_TEXT(305,122,30,20,"<?=$this->items['day'][4]?>");
	
	LODOP.ADD_PRINT_TEXT(182,151,62,20,"<?=$this->items['thisname'][0]?>");
	LODOP.ADD_PRINT_TEXT(219,151,59,20,"<?=$this->items['thisname'][1]?>");
	LODOP.ADD_PRINT_TEXT(248,152,59,20,"<?=$this->items['thisname'][2]?>");
	LODOP.ADD_PRINT_TEXT(277,147,64,20,"<?=$this->items['thisname'][3]?>");
	LODOP.ADD_PRINT_TEXT(303,153,59,20,"<?=$this->items['thisname'][4]?>");
	
	
	LODOP.ADD_PRINT_TEXT(184,212,245,20,"<?=$this->items['mark'][0]?>");
	LODOP.ADD_PRINT_TEXT(218,212,245,20,"<?=$this->items['mark'][1]?>");
	LODOP.ADD_PRINT_TEXT(249,208,247,20,"<?=$this->items['mark'][2]?>");
	LODOP.ADD_PRINT_TEXT(278,211,240,20,"<?=$this->items['mark'][3]?>");
	LODOP.ADD_PRINT_TEXT(301,209,241,20,"<?=$this->items['mark'][4]?>");
	
	LODOP.ADD_PRINT_TEXT(186,661,100,142,"<?=$this->des?>");
	
	//LODOP.ADD_PRINT_TEXT(191,542,117,20,"<?=$this->items['subtotal'][0]?>");
	//LODOP.ADD_PRINT_TEXT(220,543,117,20,"<?=$this->items['subtotal'][1]?>");
	//LODOP.ADD_PRINT_TEXT(247,542,120,20,"<?=$this->items['subtotal'][2]?>");
	//LODOP.ADD_PRINT_TEXT(277,541,123,20,"<?=$this->items['subtotal'][3]?>");
	//LODOP.ADD_PRINT_TEXT(307,541,121,20,"<?=$this->items['subtotal'][4]?>");
	
	LODOP.ADD_PRINT_TEXT(191,542,117,20,"<?=$this->items['subtotal'][0]?>");
	LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
	LODOP.ADD_PRINT_TEXT(220,543,117,20,"<?=$this->items['subtotal'][1]?>");
	LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
	LODOP.ADD_PRINT_TEXT(247,542,120,20,"<?=$this->items['subtotal'][2]?>");
	LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
	LODOP.ADD_PRINT_TEXT(277,541,123,20,"<?=$this->items['subtotal'][3]?>");
	LODOP.SET_PRINT_STYLEA(0,"Alignment",3);
	LODOP.ADD_PRINT_TEXT(307,541,121,20,"<?=$this->items['subtotal'][4]?>");
	LODOP.SET_PRINT_STYLEA(0,"Alignment",3);

	LODOP.ADD_PRINT_TEXT(336,594,161,20,"<?=$this->totals?>");
<?php endif; ?>
	LODOP.PRINT_DESIGN();
  };    
</script>
<div class="t_2">
     <div class="fl">日报基本信息</div>
     <div class="fr add_form"></div>
</div>
<div class="order_show" id="info_form">
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
            <tr>
                <td class="td1" width="15%">发布日期：</td>
                <td width="35%"><?=$this->daily['dateline']?></td>
                <td class="td1" width="15%">申请人：</td>
                <td width="35%"><?=$this->daily['nickname']?></td>
            </tr>
            <tr>
                <td class="td1">审核状态：</td>
                <td><?=$this->daily['audit_statename']?></td>
                <td class="td1">创建日期：</td>
                <td><?= date('Y-m-d H:i:s',$this->daily['created_time']);?></td>
            </tr>
     </table>
</div>

<div class="t_2">
     <div class="fl">已保存日报</div>
     <div class="fr add_form"></div>
</div>
<div class="order_show" id="info_form">
	<?php $loopindex=0; foreach((array)$this->results as $k=>$item): ?>
		<table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
            <tr>
                <td class="td1" width="15%">项目阶段：</td>
                <td width="35%"><?=$item['project_phase']?></td>
                <td class="td1" width="15%">工作结果：</td>
                <td width="35%"><?=$item['work_result']?></td>
            </tr>
            <tr>
                <td class="td1">工作说明：</td>
                <td><?=$item['work_mark']?></td>
                <td class="td1">工作对象：</td>
                <td><?=$item['work_object']?></td>
            </tr>
            <tr>
                <td class="td1">结果说明：</td>
                <td colspan="3"><?=$item['result_mark']?></td>
                
            </tr>
            
            <?php foreach((array)$this->result[$loopindex] as $rkey=>$ritem): ?>
            <tr>
            	<?php foreach((array)$ritem as $dkey=>$ditem): ?>
            		<td class="td1"><?=$this->detail[$dkey]?>：</td>
                	<td><?=$ditem?></td>
            	 <?php endforeach; ?>
               
            </tr>
             <?php  endforeach; $loopindex ++;?>

            <tr>
                <td class="td1">备注：</td>
                <td ><?=$item['mark']?></td>
                <td class="td1">合计：</td>
                <td ><?=$item['total']?></td>
            </tr>
            <tr>
                <td colspan="4"></td>
            </tr>
     </table>
	 <?php endforeach; ?>
	 <form id="xxx">
     	<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td  class="td1"  width="15%">费用总计：</td>
				<td width="85%"><?=$this->total?>元</td>
			</tr>
			<?php if($this->daily['audit_state']==$this->step): ?>
			<?php if($this->step==1 ): ?>
			<tr>
				<td>评分：</td>
				<td><input type="text" name="score" id="score" value=""/>评分范围 1~100</td>
			</tr>
			<tr>
				<td>评价：</td>
				<td><textarea name="p"></textarea></td>
			</tr>
            <?php else: ?>
            <tr>
				<td>评分：</td>
				<td><?=$this->daily['score']?></td>
			</tr>
			<tr>
				<td>评价：</td>
				<td><?=$this->daily['app']?></td>
			</tr>
			<?php endif; ?>
			<?php if($this->step!=3): ?>
			<tr>
				<td>审核人：</td>
				<td>
					<?php if($this->next_user_list): ?>
					<select name="next_uid"/>
						<?php foreach((array)$this->next_user_list as $user): ?>
						<option value="<?=$user['uid']?>"><?=$user['nickname']?></option>
						<?php endforeach; ?>
					</select>
					<?php else: ?>
					无
					<?php endif; ?>
				</td>
			</tr>
			<?php endif; ?>
            <tr>
                <th colspan="2"><?=$this->operation?></th>
            </tr>
			<?php elseif($this->print): ?>
			<tr><th colspan="2"><input type="button" value="打印日报" onclick="javascript:CreatePrintPage();"/></th>
			<?php else: ?>
			<tr><th colspan="2">无权限操作</th></tr>
			<?php endif; ?>
     </table>
	 </form>
</div>
<div class="t_2">
     <div class="fl">日报历史操作记录</div>
     <div class="fr add_form"></div>
</div>
<div class="order_show" id="info_form">
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
            <tr>
                <th class="th0">编号</th>
                <th class="th0">操作者</th>
                <th class="th0">内容</th>
                <th class="th1">操作时间</th>
           </tr>
            <?php foreach((array)$this->logs as $lkey=>$litem): ?>
            <tr>
            		<td><?=$litem['hid']?></td>
                	<td><?=$litem['nickname']?></td>
                    <td><?=$litem['content']?></td>
                	<td><?php echo date('Y-m-d H:i:s',$litem['createtime']); ?></td>
            </tr>
             <?php  endforeach; $loopindex ++;?>
     </table>
</div>
<script>
$(function(){
	$('#xxx').submit(function(){
		
		<?php if($this->step==1 ): ?>
			var score = $('#score').val();
			if(score=='')
			{
				alert('请评分!');
				return false;
			}
	
			var reg = /^\d{1,3}$/;
			var re = score.match( reg );
			if(re)
			{
			  if(score>100 || score<1)
			  {
				 alert('评分范围 1~100!');
				 return false;
			  }
			}
			else
			{
				 alert('评分范围 1~100!');
				return false;
			}
				
		<?php endif; ?>
		
		$.post(location.href,$(this).serialize(),function(data){
			alert(data.message);
			if (data.state > 0)
			{
				window.location.reload();
			}
		},'json');
		return false;
	});
});
</script>